From: Adel Gadllah Date: Tue, 1 Jul 2014 09:26:53 +0000 (+0200) Subject: hidpi: Scale fonts on wayland X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2364 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=775bd961b679ae0113684551393f69ca6e77ed77;p=gnome-shell.git hidpi: Scale fonts on wayland On X11 we don't need to scale up fonts because font scaling is already handled by clutter based xft-dpi. On wayland we need to set the resolution by ourselves so do that when the scale factor changes. https://bugzilla.gnome.org/show_bug.cgi?id=732537 --- diff --git a/src/shell-global.c b/src/shell-global.c index 18e3e0993..dab830408 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -784,7 +784,11 @@ update_scale_factor (GtkSettings *settings, g_value_init (&value, G_TYPE_INT); if (gdk_screen_get_setting (global->gdk_screen, "gdk-window-scaling-factor", &value)) - g_object_set (context, "scale-factor", g_value_get_int (&value), NULL); + { + g_object_set (context, "scale-factor", g_value_get_int (&value), NULL); + if (meta_is_wayland_compositor ()) + g_object_set (clutter_settings_get_default (), "font-dpi", 96 * 1024 * g_value_get_int (&value), NULL); + } /* Make sure clutter and gdk scaling stays disabled */ g_object_set (clutter_settings_get_default (), "window-scaling-factor", 1, NULL);